import { DNYMIC_LIKE_STATUS, DYNAMIC_LIKE_TYPE } from '@/enum/dynamic';
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
import { BaseEntity } from './base.entity';

/**
 * 用户匹配需求表
 */
@Entity('dynamic_like')
export class DynamicLike extends BaseEntity {
  @PrimaryGeneratedColumn({
    type: 'int',
    name: 'id',
    comment: '主键，自增',
  })
  id: number;

  @Column({
    type: 'int',
    name: 'like_type',
    comment: `
      点赞类型，
      1是动态点赞
      2是评论点赞
      3是回复点赞
    `,
  })
  likeType: DYNAMIC_LIKE_TYPE;

  @Column({
    type: 'int',
    name: 'like_user_id',
    comment: '点赞人id',
  })
  likeUserId: number;

  @Column({
    type: 'int',
    name: 'like_target_id',
    comment: '被点赞动态的id',
  })
  likeTargetId: DYNAMIC_LIKE_TYPE;

  @Column({
    type: 'int',
    name: 'status',
    comment: `
      点赞状态，
      0表示不点赞
      1表示点赞
    `,
  })
  status: DNYMIC_LIKE_STATUS;
}
